package com.example.wlt.personnel_manegement_system.Manager.Person;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.example.wlt.personnel_manegement_system.Adapter.StudioAdapter;
import com.example.wlt.personnel_manegement_system.Item.Item_managestudio;
import com.example.wlt.personnel_manegement_system.R;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by WLT on 2016/5/2.
 */
public class Fragment_managestudio extends Fragment {
    private ListView lv_item;//实验室管理名单
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.person_studiomanage, container, false);
        lv_item = (ListView)view. findViewById(R.id.lv_studiomanage_item);
        //创建数据源
        List<Item_managestudio> Item=new ArrayList<>();
        for(int i=0;i<20;i++){
            Item.add(new Item_managestudio
                    (
                            "843657046",
                            "王小二"+i,
                            "同意",
                            "拒绝"
                    ));
        }
        //加载适配器
        lv_item.setAdapter(new StudioAdapter(this.getActivity(),this.getActivity().getApplicationContext(),Item));

     return view;
    }
}
